package com.xmut.mall.order.feign;

import com.xmut.mall.order.utils.RespBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("mall-coupon")
public interface CouponFeignService {

    /**
     * 获取购物车结算时可用的满减活动
     *
     * @param skuIds
     * @return
     */
    @PostMapping("/coupon/fulldiscount/getCartCheckFullDiscount")
    RespBean getCartCheckFullDiscount(@RequestBody List<Long> skuIds);

    /**
     * 获取商品详情里的满减优惠的信息
     * @param skuId
     * @return
     */
    @GetMapping("/coupon/fulldiscount/getProductDetailFullDiscount/{skuId}")
    RespBean getProductDetailFullDiscount(@PathVariable Long skuId);



}
